Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve missing exports for esbuild #3719

Merged
merged 2 commits into from
Oct 17, 2024

Conversation

tjuanitas
Copy link
Contributor

Vite apps that install box-ui-elements hit the following errors:

No matching export in "node_modules/@box/box-ai-content-answers/esm/index.js" for import "QuestionType"

No matching export in "node_modules/box-ui-elements/es/elements/common/annotator-context/index.js" for import "WithAnnotatorContextProps"

No matching export in "node_modules/box-ui-elements/es/elements/common/annotator-context/index.js" for import "WithAnnotationsProps"

two issues:

  • type is needed in the import statement so that during the es build step, these lines are properly removed
  • WithAnnotationsProps and WithAnnotatorContextProps were not exported in the index.ts when ContentPreview is trying to import from that file

@tjuanitas tjuanitas requested review from a team as code owners October 17, 2024 00:22
import type { BoxItem } from '../common/types/core';
import { ERROR_CODE_EXTRACT_STRUCTURED } from '../constants';
import { isUserCorrectableError } from '../utils/error';
import type { QuestionType } from '@box/box-ai-content-answers';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eslint is forcing import order during pre-commit hook

@mergify mergify bot merged commit 495f19e into box:master Oct 17, 2024
6 checks passed
@tjuanitas tjuanitas deleted the fix-esbuild-type-imports branch October 17, 2024 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants